package com.sixnimmt.app.client;

import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.HasWidgets;
import com.sixnimmt.app.client.game.GameServiceAsync;
import com.sixnimmt.app.client.game.presenter.GamePresenter;
import com.sixnimmt.app.client.game.view.GameView;
import com.sixnimmt.app.client.i18n.SixNimmtMessages;
import com.sixnimmt.app.client.presenter.Presenter;

public class AppController implements Presenter {

	private final HandlerManager eventBus;
	private final GameServiceAsync gameService;
	private final SixNimmtMessages messages;
	private HasWidgets container;

	public AppController(GameServiceAsync gameService, HandlerManager eventBus, SixNimmtMessages messages) {
		this.eventBus = eventBus;
		this.gameService = gameService;
		this.messages = messages;
		bind();
	}

	private void bind() {

	}

	@Override
	public void go(final HasWidgets container) {
		this.container = container;

		Presenter presenter = new GamePresenter(gameService, eventBus, new GameView(messages), messages);
		presenter.go(container);

	}

}
